package com.example.entity;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    @NotNull
    private Integer id;                //用户id
    @NotEmpty
    @Pattern(regexp = "^\\S{1,18}$")
    private String password;           //密码
    @NotEmpty
    private String username;           //用户名
    @NotEmpty
    private Integer gender;            //性别
    @NotEmpty
    private String email;              //邮箱
    @NotEmpty
    private Integer permission;        //权限
    private String profile;            //个人简介
    private LocalDateTime registerTime;
    private LocalDateTime loginTime;
    private LocalDateTime logoutTime;
    private Integer status;
}
